package com.freight.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.freight.base.vo.UserVo;
import com.freight.order.dto.*;
import com.freight.order.entity.OrderOrder;
import com.freight.order.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 首页以及第二个页面
 * @author huyingtai
 */
public interface OrderMainMapper extends BaseMapper<UserVo> {

    OrderProvinceVo getOrderProvinceorderNoVo(String orderNo);

    OrderProvinceVo getOrderProvinceVo(Long userId);

    OrderProvinceVo getOrderProvinceState(Long orderId);


    OrderOrder getOrderOrdervehicleId(@Param("vehicleId") Long vehicleId);

    /**
     * 司机首页
     *
     **/
    Page<DriverGoodsVo> getHistoricalRecords(Page<DriverGoodsVo> page,
                                         @Param("req") DriverGoodsDto driverGoodsDto,@Param("userId") Long userId);


    /**
     * 司机是否有未完成订单
     * @return
     */
    List<Long> getHangintheairOrder(@Param("id") Long id);

    /**
     * 货源详情
     * @param goodsid
     * @return
     */
    PlatformGoodsVo getGoodsDetails( @Param("goodsid") Long goodsid);

    /**
     * 货主端 --- 报价跟踪
     * @param page
     * @param companyGoodsDto
     * @return
     */
    Page<CompanyGoodsVo> quotationTrack(Page<CompanyGoodsVo> page,
                                           @Param("req") CompanyGoodsDto companyGoodsDto);

    /**
     * 货主货源首页
     * @param page
     * @param companyGoodsDto
     * @return
     */
    Page<CompanyGoodsVo> getCompanyGoodsVo(Page<CompanyGoodsVo> page,
                                           @Param("req") CompanyGoodsDto companyGoodsDto);

    /**
     * 获取司机已报价货源
     *
     **/
    Page<DriverGoodsVo> getQuotedorderGoods(Page<DriverGoodsVo> page,
                                         @Param("req") DriverGoodsDto driverGoodsDto,@Param("userId")  Long userId);


    /**
     * 司机首页
     *
     **/
    Page<DriverGoodsVo> getDriverGoodsVo(Page<DriverGoodsVo> page,
                                           @Param("req") DriverGoodsDto driverGoodsDto
            , @Param("companyUserIds") Long[] companyUserIds);


    /**
     * 平台首页
     *
     **/
    Page<PlatformGoodsVo> getPcDriverGoodInfoByPage(Page<DriverGoodsVo> page,
                                                    @Param("req") AreaPcDto areaPcDto
            , @Param("companyUserIds") Long[] companyUserIds);


    }